//generater函数
//业务逻辑
import {takeEvery,put} from 'redux-saga/effects'
import {GET_MY_LIST} from './actionTypes'
import {getList} from './actionCreators'
import axios from 'axios'

function* mySaga(){
    yield takeEvery(GET_MY_LIST,getMyList)
}

function* getMyList(){
    const res = yield axios.get('http://rap2api.taobao.org/app/mock/292931/index')
    const action = getList(res.data.list)
    yield put(action)

}
export default mySaga